DROP TABLE IF EXISTS t1;
CREATE TABLE t1 (a INT) ENGINE=innodb;
BEGIN;
INSERT INTO t1 VALUES(1);
FLUSH TABLES WITH READ LOCK;
COMMIT;
SELECT * FROM t1;
UNLOCK TABLES;
BEGIN;
SELECT * FROM t1 FOR UPDATE;
BEGIN;
SELECT * FROM t1 FOR UPDATE;
FLUSH TABLES WITH READ LOCK;
COMMIT;
COMMIT;
UNLOCK TABLES;
COMMIT;
BEGIN;
INSERT INTO t1 VALUES(10);
FLUSH TABLES WITH READ LOCK;
FLUSH TABLES WITH READ LOCK;
UNLOCK TABLES;
BEGIN;
SELECT * FROM t1;
SHOW CREATE DATABASE test;
COMMIT;
DROP TABLE t1;
